import * as types from './../constants/ActionTypes';

/*
 * 系统消息列表
 ================================================================*/
export function fetchMessage(start = 1, limit = 10) {
    return (dispatch) => {
        let payload = {
            message_sys_status: 0,
            message: '加载中'
        };
        dispatch({
            payload,
            type: [types.FETCH_SYS_MESSAGES, types.FETCH_SYS_MESSAGES_SUCCESS, types.FETCH_SYS_MESSAGES_FAILURE],
                meta: {
                    fetch: [`notice/newinfo?page_no=${start}&page_size=${limit}`, {
                        method: 'get'
                    }]
                }
        });
    };
}